﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="list.aspx.vb" Inherits="task3.list" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 38px;
            height: 18px;
        }
    </style>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
    
        <a class="grabit" style="float:none; width:auto" href="/AddReview.aspx">Add New Deal</a>
        <a class="rss" href="DealsRSSFeed.aspx"><img alt="RSS" class="style1" src="Images/rss.gif" /></a><br />
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
            AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="dealsdb" CssClass="gv">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="ID" />
                <asp:BoundField DataField="Dealname" HeaderText="Dealname" 
                    SortExpression="Dealname" />
                <asp:BoundField DataField="Dealprice" HeaderText="Dealprice" 
                    SortExpression="Dealprice" />
                <asp:BoundField DataField="DealExpiry" HeaderText="DealExpiry" 
                    SortExpression="DealExpiry" />
                <asp:HyperLinkField DataNavigateUrlFields="Deallink" 
                    DataNavigateUrlFormatString="{0}" Text="GrabIt" />
                <asp:ImageField DataImageUrlField="Thumbnail" DataImageUrlFormatString="{0}">
                    <ControlStyle Height="100px" Width="100px" />
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="/detail.aspx?dealid={0}" 
                    DataTextField="Dealname" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="RateComments.aspx?ID={0}" Text="Rate" />
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataNavigateUrlFormatString="Likedeal.aspx?ID={0}" Text="Like" />
            </Columns>
        </asp:GridView>
        <asp:AccessDataSource ID="dealsdb" runat="server" 
            DataFile="~/App_Data/DealsDb.accdb" SelectCommand="SELECT * FROM [DealDetail]">
        </asp:AccessDataSource>
    </p>
        <asp:AccessDataSource ID="dealsdb0" runat="server" 
            DataFile="~/App_Data/DealsDb.accdb" 
        SelectCommand="SELECT [Dealname], [Tagname], [ID], [Thumbnail], [Dealprice], [Deallink] FROM [TagdealView] WHERE ([Tagname] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="Tagname" QueryStringField="Tagname" 
                    Type="String" />
            </SelectParameters>
        </asp:AccessDataSource>
    <p>
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
    </p>
    <p>
        </p>
    
    <asp:Rating ID="Rating1" runat="server" EmptyStarCssClass="e" 
        FilledStarCssClass="smiley-done" StarCssClass="smiley" 
        WaitingStarCssClass="empty">
    </asp:Rating>
    <br />
    <br />
    <br />
    <asp:Button ID="btn_save" runat="server" Text="Saverating" />
    <p>
    </p>
    <p>
        &nbsp;</p>
    <p>
        Show me these type of deals</p>
    <p>
        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="AccessDataSource1">
        <ItemTemplate>
        <a href="Dealbytags.aspx?Tagname=<%#Eval("TagName")%>">
        <%#Eval("TagName")%>
        </a> |
       
        
        </ItemTemplate>
        </asp:Repeater>
        <br />
        <br />
    </p>
    <p>
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
            DataFile="~/App_Data/DealsDb.accdb" 
            SelectCommand="SELECT [ID], [Tagname] FROM [Tags]"></asp:AccessDataSource>
    </p>
    <p>
        <asp:TextBox ID="tb_Tagsearch" runat="server"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btn_Tagsearch" runat="server" Text="Search" />
    </p>
</asp:Content>
